var Utils = (function () {
    var utils = {};

    // copy
    utils["copy"] = function (target) {

        var _type = typeof (target),_copy;
        if(typeof(target) =="object"){
            try{
                _copy = JSON.parse(JSON.stringify(target));
            }catch(e){
                console.log(e);
            }
        }else{
            console.log("the target is not object");
            _copy = target;
        }

        return _copy;
    };
    // strip
    utils["strip"] = function(str){
        return str?str.replace(/(^\s*)|(\s*$)/g, ''):'';
    };

    // 方法
    utils['_method'] = function(){
        var tmp = [];
        for(var key in utils){
            tmp.push(key);
        }
        return tmp;
    };


    return utils;
})();

module.exports = Utils;